// ==========================================================================
// GFast自动生成model操作代码。
// 生成日期：2024-11-15 16:59:17
// 生成路径: internal/app/system/model/withdraw_records.go
// 生成人：周
// desc:余额提现记录
// company:云南奇讯科技有限公司
// ==========================================================================

package model

import (
	"github.com/gogf/gf/v2/os/gtime"
	"github.com/gogf/gf/v2/util/gmeta"
	comModel "github.com/tiger1103/gfast/v3/internal/app/common/model"
)

// WithdrawRecordsInfoRes is the golang structure for table withdraw_records.
type WithdrawRecordsInfoRes struct {
	gmeta.Meta `orm:"table:withdraw_records"`
	Id         int         `orm:"id,primary" json:"id" dc:"提现申请记录ID"`                   // 提现申请记录ID
	Userid     int         `orm:"userid" json:"userid" dc:"用户ID"`                       // 用户ID
	Money      float64     `orm:"money" json:"money" dc:"提现金额"`                         // 提现金额
	Balance    float64     `orm:"balance" json:"balance" dc:"当前余额"`                     // 当前余额
	Status     int         `orm:"status" json:"status" dc:"提现状态：1-待审核  2-已到账 3-审核失败  "` // 提现状态：1-待审核  2-已到账 3-审核失败
	Reason     string      `orm:"reason" json:"reason" dc:"提现失败原因"`                     // 提现失败原因
	SubmitTime *gtime.Time `orm:"submit_time" json:"submitTime" dc:"提交审核时间"`            // 提交审核时间
	ArriveTime *gtime.Time `orm:"arrive_time" json:"arriveTime" dc:"到账时间"`              // 到账时间
	CreatedAt  *gtime.Time `orm:"created_at" json:"createdAt" dc:""`                    //
	UpdatedAt  *gtime.Time `orm:"updated_at" json:"updatedAt" dc:""`                    //
}

type WithdrawRecordsListRes struct {
	Id         int         `json:"id" dc:"提现申请记录ID"`
	Userid     int         `json:"userid" dc:"用户ID"`
	Money      float64     `json:"money" dc:"提现金额"`
	Balance    float64     `json:"balance" dc:"当前余额"`
	Status     int         `json:"status" dc:"提现状态：1-待审核  2-已到账 3-审核失败  "`
	Reason     string      `json:"reason" dc:"提现失败原因"`
	SubmitTime *gtime.Time `json:"submitTime" dc:"提交审核时间"`
	ArriveTime *gtime.Time `json:"arriveTime" dc:"到账时间"`
	CreatedAt  *gtime.Time `json:"createdAt" dc:""`
}

// WithdrawRecordsSearchReq 分页请求参数
type WithdrawRecordsSearchReq struct {
	comModel.PageReq
	Id         string `p:"id" dc:"提现申请记录ID"`                                                                         //提现申请记录ID
	Userid     string `p:"userid" v:"userid@integer#用户ID需为整数" dc:"用户ID"`                                             //用户ID
	Money      string `p:"money" v:"money@float#提现金额需为浮点数" dc:"提现金额"`                                                //提现金额
	Balance    string `p:"balance" v:"balance@float#当前余额需为浮点数" dc:"当前余额"`                                            //当前余额
	Status     string `p:"status" v:"status@integer#提现状态：1-待审核  2-已到账 3-审核失败  需为整数" dc:"提现状态：1-待审核  2-已到账 3-审核失败  "` //提现状态：1-待审核  2-已到账 3-审核失败
	Reason     string `p:"reason" dc:"提现失败原因"`                                                                       //提现失败原因
	SubmitTime string `p:"submitTime" v:"submitTime@datetime#提交审核时间需为YYYY-MM-DD hh:mm:ss格式" dc:"提交审核时间"`             //提交审核时间
	ArriveTime string `p:"arriveTime" v:"arriveTime@datetime#到账时间需为YYYY-MM-DD hh:mm:ss格式" dc:"到账时间"`                 //到账时间
	CreatedAt  string `p:"createdAt" v:"createdAt@datetime#需为YYYY-MM-DD hh:mm:ss格式" dc:""`                           //
}

// WithdrawRecordsSearchRes 列表返回结果
type WithdrawRecordsSearchRes struct {
	comModel.ListRes
	List []*WithdrawRecordsListRes `json:"list"`
}

// WithdrawRecordsAddReq 添加操作请求参数
type WithdrawRecordsAddReq struct {
	Status int    `p:"status" v:"required#提现状态：1-待审核  2-已到账 3-审核失败  不能为空" dc:"提现状态：1-待审核  2-已到账 3-审核失败  "`
	Reason string `p:"reason"  dc:"提现失败原因"`
}

// WithdrawRecordsEditReq 修改操作请求参数
type WithdrawRecordsEditReq struct {
	Id     int    `p:"id" v:"required#主键ID不能为空" dc:"提现申请记录ID"`
	Status int    `p:"status" v:"required#提现状态：1-待审核  2-已到账 3-审核失败  不能为空" dc:"提现状态：1-待审核  2-已到账 3-审核失败  "`
	Reason string `p:"reason"  dc:"提现失败原因"`
}
